package com.machine.action.admin;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.machine.dao.user.UserDao;
import com.opensymphony.xwork2.ActionSupport;

@Component("addBetterMes")
@Scope("prototype")
public class AddBetterMes extends ActionSupport {
	private static final long serialVersionUID = 1L;

	private String mingcheng;
	private String dingdanhao;
	private String gonghuoshang;
	private UserDao userDao;

	public UserDao getUserDao() {
		return userDao;
	}
	
	@Resource
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	public String getMingcheng() {
		return mingcheng;
	}

	public void setMingcheng(String mingcheng) {
		this.mingcheng = mingcheng;
	}

	public String getDingdanhao() {
		return dingdanhao;
	}

	public void setDingdanhao(String dingdanhao) {
		this.dingdanhao = dingdanhao;
	}

	public String getGonghuoshang() {
		return gonghuoshang;
	}

	public void setGonghuoshang(String gonghuoshang) {
		this.gonghuoshang = gonghuoshang;
	}
	
	@Override
	public String execute() throws Exception {
		userDao.insertBetterSupport(mingcheng, dingdanhao, gonghuoshang);
		return SUCCESS;
	}
}
